import request from '@/utils/request'
import {userInfo} from '@/types/user.ts'
import {loginRes,loginSuccess} from '@/api/response/loginResponse.ts'
export function login(loginInfo:userInfo):Promise<loginSuccess>{
    return request({
        url:'/login',
        method:'post',
        data:loginInfo
    })
}

//获取验证码

export function getCode():Promise<loginRes>{
    return request({
        url:'/captchaImage',
        method:'get'
    })
}